package com.tianxiabuyi.model.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.tianxiabuyi.model.base.TXBYObject;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;


/**
 * 问卷调查问题<br>
 * @author yangh
 */
@Entity
@Table(name = "survey_question")
public class SurveyQuestion extends TXBYObject {
	@Column(name="survey_id")@JSONField(name = "survey_id")
	private Integer surveyId;       // 所属问卷
	@Column(name="show_order")@JSONField(name = "show_order")
	private Integer showOrder;      // 排序
	private String title;           // 标题
	private Integer type;           // 题型
	@Column(name="parent_id")@JSONField(name = "parent_id")
	private Integer parentId;       // 所属问题大类
	private Integer necessary;      // 是否为必填项
	private String detail;          // 问卷描述
	@Transient
	private List<SurveyQuestion> quests = new ArrayList<SurveyQuestion>(); // 大分类下的问题
	@Transient
	private List<SurveyQuestion> multiInputs = new ArrayList<SurveyQuestion>(); // 多项填空的问题
	@Transient
	private List<SurveyOptions> options = new ArrayList<SurveyOptions>(); // 选项列表
	@Transient
	private List<SurveyScore> scores = new ArrayList<SurveyScore>(); // 问题的分段

	public List<SurveyQuestion> getQuests() {
		return quests;
	}

	public void setQuests(List<SurveyQuestion> quests) {
		this.quests = quests;
	}

	public List<SurveyQuestion> getMultiInputs() {
		return multiInputs;
	}

	public void setMultiInputs(List<SurveyQuestion> multiInputs) {
		this.multiInputs = multiInputs;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public Integer getNecessary() {
		return necessary;
	}

	public void setNecessary(Integer necessary) {
		this.necessary = necessary;
	}

	public List<SurveyScore> getScores() {
		return scores;
	}

	public void setScores(List<SurveyScore> scores) {
		this.scores = scores;
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public Integer getShowOrder() {
		return showOrder;
	}

	public void setShowOrder(Integer showOrder) {
		this.showOrder = showOrder;
	}

	public String getTitle() {
		return title;
	}
	
	public void setTitle(String title) {
		this.title = title;
	}
	
	public Integer getType() {
		return type;
	}
	
	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getSurveyId() {
		return surveyId;
	}

	public void setSurveyId(Integer surveyId) {
		this.surveyId = surveyId;
	}

	public List<SurveyOptions> getOptions() {
		return options;
	}

	public void setOptions(List<SurveyOptions> options) {
		this.options = options;
	}
	
	
}